<?php

namespace zhtfrontend\models\datas;

use doumiaoduo\ueditor\ImageUploadWechatTrait;
use zhtfrontend\components\bases\BaseModel;
use Yii;

/**
 * This is the model class for table "{{%lesson_media}}".
 *
 * @property integer $id
 * @property integer $lesson_id
 * @property integer $student_id
 * @property integer $m_type
 * @property integer $is_refouce
 * @property integer $status
 * @property string $url_path
 */
class LessonMedia extends BaseModel
{
    use ImageUploadWechatTrait;
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%lesson_media}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['lesson_id', 'student_id', 'm_type', 'is_refouce', 'status','medias_id'], 'integer'],
            [['picture'], 'string'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('zhtfrontend', 'ID编号'),
            'lesson_id' => Yii::t('zhtfrontend', '课次序号'),
            'student_id' => Yii::t('zhtfrontend', '学员编号'),
            'm_type' => Yii::t('zhtfrontend', '媒体类型(0图片;1视频)'),
            'is_refouce' => Yii::t('zhtfrontend', '是课下练习(0否-为上课花絮;1是)'),
            'status' => Yii::t('zhtfrontend', '对应状态(0非正常；1正常)'),
            'picture' => Yii::t('zhtfrontend', '默认图片'),
            'medias_id' => Yii::t('zhtfrontend', '图片id'),
        ];
    }
}
